import { createBrowserRouter } from "react-router-dom";
import Home from "@/pages/home/Home";
import Article from "@/pages/article/Article";
import Detail from "@/pages/detail/Detail";

export const homeRouter = [
    {
        path: 'article',
        title: '列表',
        element: <Article></Article>,
        children: [
            {
                path: 'detail/:id',
                title: '详情页',
                element: <Detail></Detail>
            },
        ]
    },

]
const router = createBrowserRouter([
    {
        path: '/',
        element: <Home></Home>,
        children: homeRouter
    }
])
export default router